import request from '@/utils/request'

// 查询销售详情列表
export function listXqsale(query) {
  return request({
    url: '/supermarket/xqsale/list',
    method: 'get',
    params: query
  })
}

export function listXqsaleProfit(query) {
  return request({
    url: '/supermarket/xqsale/listprofit',
    method: 'get',
    params: query
  })
}
// 查询销售详情详细
export function getXqsale(xqsaleId) {
  return request({
    url: '/supermarket/xqsale/' + xqsaleId,
    method: 'get'
  })
}

// 新增销售详情
export function addXqsale(data) {
  return request({
    url: '/supermarket/xqsale',
    method: 'post',
    data: data
  })
}

// 修改销售详情
export function updateXqsale(data) {
  return request({
    url: '/supermarket/xqsale',
    method: 'put',
    data: data
  })
}

// 删除销售详情
export function delXqsale(xqsaleId) {
  return request({
    url: '/supermarket/xqsale/' + xqsaleId,
    method: 'delete'
  })
}
